package com.ruoyi.provider.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 案件信息表
 * @TableName ahct_case
 * @author Wang RuLong
 */

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="AhctCase", description="用户站点配置")
public class AhctCase extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     *  主键id
     */
    @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, prompt = "编号")
    private Integer id;

    /**
     * 客户全称
     */
    @Excel(name = "保险公司")
    @Size(min = 0, max = 20, message = "保险公司长度不能超过20个字符")
    private String company_name;

    /**
     * 接单时间
     */
//    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}$", message = "时间格式必须为yyyy-MM-dd HH:mm:ss")
    @Excel(name = "接单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date receiving_time;

    /**
     * 案件号
     */
    @Size(min = 20, max = 30, message = "案件号长度必须大于等于20个字符且不超过30个字符")
//    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Excel(name = "案件号")
    private String case_number;

    /**
     * 车牌号
     */
    @Size(min = 0, max = 8, message = "车牌号长度不能超过8位")
    @Excel(name = "车牌号")
    private String car_number;

    /**
     * 案件所在省
     */
    @Size(min = 0, max = 10, message = "省份长度不能超过10个字符")
    @Excel(name = "案件所在省")
    private String province;

    /**
     * 案件所在市
     */
    @Size(min = 0, max = 10, message = "市区名称长度不能超过10个字符")
    @Excel(name = "案件所在市")
    private String city;

    /**
     * 案件所在区
     */
    @Size(min = 0, max = 10, message = "区级名称长度不能超过10个字符")
    @Excel(name = "案件所在区")
    private String area;

    /**
     * 事故地址
     */
    @Excel(name = "事故地址")
    @Size(min = 0, max = 50, message = "事故地址长度不能超过50个字符")
    private String accident_address;

    /**
     * 损失项目
     */
    @Size(min = 0, max = 20, message = "损失项目长度不能超过20个字符")
    @Size(min = 0, max = 20, message = "损失项目长度不能超过20个字符")
    @Excel(name = "损失项目")
    private String loss_items;

    /**
     * 现场查勘员
     */
    @Size(min = 0, max = 10, message = "查勘员姓名长度不能超过10个字符")
    @Excel(name = "公司查勘")
    private String surveyer;

    /**
     * 是否维修：1是 0否
     */
    @Min(value = 0)
    @Max(value = 1, message = "是否维修的值必须小于等于1")
    @Excel(name = "是否维修",readConverterExp = "0=否,1=是")
    private Integer is_repair;

    /**
     * 物损方确定报价
     */
    @Excel(name = "物损方报价")
    private BigDecimal damage_customer_price;

    /**
     * 竞标价格
     */
    @Excel(name = "我司竞标价格")
    private BigDecimal bid_price;

    /**
     * 是否中标：1是 0否
     */
    @Min(value = 0)
    @Max(value = 1, message = "是否中标的值必须小于等于1")
    @Excel(name = "是否中标",readConverterExp = "0=否,1=是")
    private Integer is_bidder;

    /**
     * 保险核损价格
     */
    @Excel(name = "保险核损价格")
    private BigDecimal write_off_price;

    /**
     * 案件成本
     */
    @Excel(name = "案件成本")
    private BigDecimal case_cost;

    /**
     *  业务费
     */
    @Excel(name = "业务费")
    private BigDecimal operation_cost;

    /**
     * 毛利润
     */
    @Excel(name = "毛利润")
    private BigDecimal gross_profit;

    /**
     * 描述
     */
    @Excel(name = "进度或问题点")
    private String describe;

    /**
     * 到账时间
     */
//    @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}\\s\\d{2}:\\d{2}:\\d{2}$", message = "时间格式必须为yyyy-MM-dd HH:mm:ss")
    @Excel(name = "到账时间",width = 30,dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date receipt_time;

    /**
     * 维修款支付情况
     */
    @Size(min = 0, max = 50, message = "维修款支付长度不能超过50个字符")
    @Excel(name = "维修款支付")
    private String payment_stu;

    /**
     * 1.已结案  2.正在查勘  3.正在定损
     */
    @Min(value = 0)
    @Max(value = 1, message = "查勘状态的值必须小于等于1")
    @Excel(name = "查勘状态",readConverterExp = "0=案件废弃,1=已结案,2=正在查勘,3=正在定损")
    private Integer status;

    /**
     * 查勘老师
     */
    @Size(min = 0, max = 10, message = "物损老师姓名长度不能超过10个字符")
    @Excel(name = "物损老师")
    private String survey_teacher;

    /**
     * 物损方及电话
     */
    @Size(min = 0, max = 30, message = "物损方及电话长度不能超过30个字符")
    @Excel(name = "物损方及电话")
    private String damage_customer;

    /**
     * 维修收款信息
     */
    @Excel(name = "维修收款信息")
    private String repair_payment;

    /**
     * 维修收款人电话
     */
    @Size(min = 0, max = 20, message = "维修收款人电话长度不能超过20个字符")
    @Excel(name = "维修收款人电话")
    private String recipient_phone;

    /**
     * 是否开票及发票号码
     */
    @Excel(name = "是否开票及发票号码")
    private String invoicing;

    /**
     * 标绿为回款登记
     * 标黄为付款登记
     */
//    @Excel(name = "标绿为回款登记,标黄为付款登记")

    private Integer page;
    private Integer pageSize;

    /**
     * 客户分公司
     */
    private String sun_company_name;

    /**
     * 案件类型
     * 1.机动车  2.电瓶车
     */
    private Integer case_type;

    /**
     * 逻辑删除
     */
    private Integer deleted;

    /**
     * 创建者
     */
    private String create_by;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date create_time;

    /**
     * 更新者
     */
    private String update_by;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date update_time;

    /**
     * code码
     */
    private String address_code;
}
